Conventionally, has been known a surface defect inspection device that detects a defect at a painted surface of the body of a vehicle, with image processing. For example, such a surface defect inspection device is disclosed in Patent Literature 1. Examples of the defect include so called “seeding”, “sagging”, and “crawling” that are roughness at painted faces.
The surface defect inspection device disclosed in Patent Literature 1 irradiates an inspection face of an inspection object with light in a light-and-dark pattern, creates a received-light image, on the basis of reflected light from the inspection face, and inspects a defect on the inspection face, on the basis of the received-light image.
As in Patent Literature 1, in a case where a defect is detected from an image acquired by capturing an inspection face illuminated with light, reflected light that travels to an image capturing unit if no defect is present, is reflected by the defect in a direction deviating from the image capturing unit. Thus, the defect is darkly shown on the image. Therefore, a dark portion in the image is extracted by image processing, resulting in detection of the defect. Meanwhile, the roughness of so-called orange peel that is not a defect, is present at a painted surface. In a case where a defect is detected with the method, the roughness of orange peel is likely to be detected wrongly as the defect. Thus, the surface defect inspection device disclosed in Patent Literature 1 expands and contracts, in a case where the area S of a defect candidate region is a previously set reference area Sref or more in the received-light image, a boundary region in the light-and-dark pattern, to integrate orange peel occurring near the boundary region in the light-and-dark pattern, with the boundary region in the light-and-dark pattern. Thus, wrong detection of orange peel is prevented.
For the surface defect inspection device disclosed in Patent Literature 1, in a case where the reference area Sref is set at a relatively large value, the area S of a defect candidate region is less likely to be the reference area Sref or more, resulting in reduction of the image processing of expanding and contracting a boundary region in the light-and-dark pattern. As a result, image processing time, namely, inspection time can be shortened. However, in this case, even though the defect candidate region is based on orange peel, the area S is not necessarily the reference area Sref or more, so that the orange peel is likely to be wrongly detected.